/*
 * WebServer.java
 *
 * Created on 29 de Junho de 2005, 16:54
 */

package jhub.img;

import java.net.*;

public final class WebServer {
    public static void main(String args[]) throws Exception {

        //Establish the listen socket
        int PORT = 5306;     //select your favorite number > 1123
        ServerSocket listenSocket = new ServerSocket(PORT);

        //Process HTTP service requests in an infinite loop
        while(true) {
            //listen for TCP connection request
            //Construct an object to process the HTTP request message
            HttpRequest request = new HttpRequest(listenSocket.accept());
            Thread thread = new Thread(request);
            thread.start();
        }
    }
}

